package ac.svn.accesscontrol.ui;

import java.awt.Color;

import javax.swing.Icon;
import javax.swing.JLabel;

import ac.svn.accesscontrol.utils.UIUtility;

public class WhiteLabel extends JLabel {

    /**
     * 
     */
    private static final long serialVersionUID = 1L;

    public WhiteLabel() {
	initProperties();
    }

    public WhiteLabel(String arg0) {
	super(arg0);
	initProperties();
    }

    public WhiteLabel(Icon arg0) {
	super(arg0);
	initProperties();
    }

    public WhiteLabel(String arg0, int arg1) {
	super(arg0, arg1);
	initProperties();
    }

    public WhiteLabel(Icon arg0, int arg1) {
	super(arg0, arg1);
	initProperties();
    }

    public WhiteLabel(String arg0, Icon arg1, int arg2) {
	super(arg0, arg1, arg2);
	initProperties();
    }

    private void initProperties()
    {
	setOpaque(true);
	setBackground(Color.WHITE);
    }

    public void enableShadow(boolean b)
    {
	if(b)
	{
	    UIUtility.setAllShadowedBorder(this);
	}
	else
	{
	    setBorder((new JLabel()).getBorder());   
	}
    }

}
